local blaze = require "blaze"
local app = require "app"
local gamelib = require "club.threecard.gamelib"

local game = gamelib.game.new({
    package = "club.threecard.sudoku",
    on_start = function(self)
        gamelib.game_scene.overried_entrance(self.config.entrance)
        self.kbe.register("SudokuPlayer")
        self.kbe.register("SudokuRoom")
        self.kbe.register("Seat")

        local ConnectingUI = require "club.threecard.sudoku.ui.connecting.ConnectingUI"
        local connecting_ui = ConnectingUI.new()
        connecting_ui:load()
        connecting_ui:set_layer(app.config.ui.layout.top.layer + 5)
        app.netstate.skin(connecting_ui)

        self.ui.init_routes()
    end,
    on_started = function(self)
        if self.reconnection.fast_resume() then
            return
        end
        self.router.go("/club.threecard.sudoku/main")
    end,
    on_exited = function(self)
        app.netstate.unskin()
    end
})
return game